From: Bartosz DziewoƄski Date: Mon, 22 Aug 2016 19:16:21 +0000 (+0200) Subject: ApiUpload: Fix fatal in dieStatusWithCode() X-Git-Tag: 1.31.0-rc.0~5965 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=0afc3cf016da0284e011cd7f8d5489a57d615698;p=lhc%2Fweb%2Fwiklou.git ApiUpload: Fix fatal in dieStatusWithCode() If $extraData was null, but $moreExtraData was given, the following fatal would occur: Fatal error: Unsupported operand types in /var/www/html/w/includes/api/ApiUpload.php on line 408 Follow-up to c9b5b3e988e3554c231860a2da587dff16b05e0c. Change-Id: I613eed1f7429247fe46afa454d36f518f6a81ebe --- diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index ac817ba3c9..f7ce55214e 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -405,6 +405,7 @@ class ApiUpload extends ApiBase { $code = $overrideCode; } if ( $moreExtraData ) { + $extraData = $extraData ?: []; $extraData += $moreExtraData; } $this->dieUsage( $msg, $code, 0, $extraData );